#ifndef MODBUSLISTXML_H
#define MODBUSLISTXML_H

#include <QObject>
#include <QStringList>
#include "BaseXml.h"
#include "DataType/ControlPointStruct.h"
#include "DataType/ModbusControlStruct.h"
#include "DataType/RangePointStruct.h"
#include "System/System.h"
class ModbusListXml : public BaseXml<ModbusListXml>
{
public:
    friend class BaseXml<ModbusListXml>;
    int m_queryNum;
    int m_queryNo;
    int m_queryStata;
    bool parser();
    QList<ModbusControlStruct> modbusControlList(const ControlPointStruct &controlPoint);
    QList<ModbusControlStruct> modbusControlList(const QList<ControlPointStruct> &controlPointList);

    QList<ControlPointStruct> controlPointList(const ModbusControlStruct &modbusControl);

    QList<quint16> deviceAddressList() const;

    QList<ModbusControlStruct> m_modbusStructList;
    QMultiMap<int,ModbusControlStruct> m_modbusQueryMap;
private:   
    explicit ModbusListXml();
    bool clear();
    QMultiMap<ModbusControlStruct,ControlPointStruct> m_pointMultiMap;
    QMultiMap<ControlPointStruct,ModbusControlStruct> m_controlMultiMap;
    QMap<ModbusControlStruct,QList<RangePointStruct> > m_transitionMap;
    QList<quint16> m_deviceAddressList;
};

#endif // MODBUSLISTXML_H
